from selenium.webdriver.common.by import By

from page.base_page import BasePage
from utils import DriverTools


class HomePage(BasePage):
    """首页"""

    def __init__(self):
        self.driver = DriverTools.get_driver()
        self.login_btn_loc = (By.CSS_SELECTOR, ".red")



    def click_login_btn(self):
        # self.driver.find_element(self.login_btn_loc[0], self.login_btn_loc[1]).click()
        # 显示等待定位元素
        self.find_el(self.login_btn_loc).click()


if __name__ == '__main__':
    driver = DriverTools.get_driver()
    driver.get("http://hmshop-test.itheima.net/")
    HomePage().click_login_btn()